app.run = function(){
	$(".button-login").bind('touchstart',function(){
		var data = {}
		data.user = $("input[name='user']").val()
		data.pass = $("input[name='pass']").val()
		$.ajax({
			url:app.server+"/user/login",
			type:"post",
			data:data,
			dataType:"json",
			success:function(data, status, xhr){
				if (data.code == "0") {
					var t = xhr.getResponseHeader("Custom-Header")
					if (t != "" && t != null) {
						var tokenArr = t.split(":")
						app.user_name = data.user_name
						if (tokenArr.length == 2) {
							app.token = tokenArr[0]
							app.token_time = tokenArr[1]
							if (app.token != "" && app.token != null) {
								s.set("token", app.token)
								s.set("token_time", app.token_time)
								s.set("user_name", app.user_name, function(){
									window.location.href="content.html"
								})
							}
						}
					}
				} else {
					alert("登陆错误:"+data.info)
				}
			}
		})
	})
}